home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / PET / S-Super PET / (s)tk.d64 / TAB.ASM < prev    next >
Assembly Source File  |  2009-01-18  |  1KB  |  41 lines

  1. ;tab.asm. Three different tab settings from menu. Loads in bank 15.
  2.  
  3. xref tabset_, getchar_, printf_
  4. service_ equ $32
  5. kyputb_  equ $dd82
  6.  
  7.         ldd   #instruct ; load address of instruction string
  8.         jsr   printf_
  9.         loop
  10.           jsr   kyputb_   ; read character from keyboard (No RETURN)
  11.           cmpb  #'p       ; and stay in loop until you get 1 of 3
  12.           if eq           ; acceptable characters.
  13.             ldd #pstops
  14.             jmp done
  15.           endif
  16.           cmpb #'d      ; want document tabstops?
  17.           if eq
  18.             ldd #dstops
  19.             jmp done
  20.           endif
  21.           cmpb #'w
  22.           if eq
  23.             ldd #sstops
  24.             jmp done
  25.           endif
  26.         endloop
  27. done    jsr   tabset_   ; go to subroutine to set them
  28.         clr   service_  ; return to menu
  29.         rts
  30.  
  31. instruct fcc "Enter 'p' for program tabs; 'd' for document tabs; "
  32.          fcc "'w' for Waterloo tabs.%n"
  33.          fcb 0
  34.  
  35. sstops       fdb     01,09,17,25,33,41,49,57,65,73  ; Standard Waterloo stops
  36.  
  37. pstops       fdb     07,09,11,13,15,17,19,41,61,80  ; Program-writing stops
  38.  
  39. dstops       fdb     01,05,10,15,20,25,30,41,61,80  ; Document stops
  40.              end     ; tabs are set at screen columns listed above.
  41.